<template>
  <div>
    <van-sticky>
      <van-nav-bar right-text="举报" left-arrow @click-left="goback" />
    </van-sticky>
    <div class="top">
      <div class="header">
        <div class="left">
          <div>
            <van-image
              fit="cover"
              class="tx"
              round
              src="https://img01.yzcdn.cn/vant/cat.jpeg"
            />
          </div>
          <div class="middle">
            <span class="spname">penny</span>
            <span class="spid">ID: {{ Date.now() }}</span>
            <span class="spjy">经验值: 10/100</span>
            <div class="jy1">
              <div class="jy2"></div>
            </div>
          </div>
        </div>
        <button class="button1">+关注</button>
      </div>

      <div class="sj">
        <div class="sj1">
          <div class="sj2">0</div>
          <div class="sj3">关注</div>
        </div>
        <div class="sj1">
          <div class="sj2">53</div>
          <div class="sj3">粉丝</div>
        </div>
        <div class="sj1">
          <div class="sj2">0</div>
          <div class="sj3">帮贡</div>
        </div>
      </div>
    </div>
    <div class="sl1">
      <div class="sl2">20个作品</div>
      <div class="sl2">0个食谱</div>
      <div class="sl3">0个回答</div>
    </div>
    <van-tabs v-model="active">
      <van-tab title="作品">
        <van-empty v-if="!data" description="请继续加油哦~"></van-empty>
        <show-item></show-item>
      </van-tab>
      <van-tab title="食谱">
        <van-empty description="请继续加油哦~"></van-empty>
      </van-tab>
      <van-tab title="问答">
        <van-empty description="请继续加油哦~"></van-empty>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import ShowItem from "@/components/ShowItem.vue";
export default {
  components: { ShowItem },
  data() {
    return {
      active: 0,
      data: null,
    };
  },
  methods: {
    goback() {
      this.$router.go(-1);
    },
  },
};
</script>

<style scoped>
:deep(.van-nav-bar__arrow) {
  font-size: 18px;
  color: #4a4945;
}
:deep(.van-nav-bar__text) {
  color: #999999 !important;
  font-size: 16px;
}
:deep(.van-tabs__line) {
  bottom: 20px;
  /* width: 30px; */
  background-color: #ea9077;
}
</style>

<style lang="scss" scoped>
.tx {
  width: 78px;
  height: 78px;
  font-size: 0;
  margin-right: 10px;
}
.top {
  background-color: #fff;
}
.header {
  display: flex;
  padding: 10px 15px;
  justify-content: space-between;
  align-items: center;
}
.left {
  display: flex;
}
.middle {
  display: flex;
  flex-direction: column;
}
.spname {
  line-height: 28px;
  color: #4a4945;
  font-size: 20px;
  position: relative;
}

.spid {
  font-size: 12px;
  color: #999999;
  margin: 4px 0 5px;
}
.spjy {
  font-size: 10px;
  color: #999999;
  padding-bottom: 1px;
}
.jy1 {
  position: relative;
  width: 100px;
  height: 4px;
  background-color: #eeedeb;
  margin: 0;
  border-radius: 5px;
  overflow: hidden;
}
.jy2 {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
  height: 4px;
  border-radius: 5px;
  background-color: #1976d2;
  width: 10%;
}
.button1 {
  font-size: 10px;
  width: 58px;
  height: 28px;
  border-style: none;
  border: 1px solid #e98b71;
  color: #e98b71;
  background-color: #ffffff;
  border-radius: 4px;
}
// .button2 {
//   font-size: 10px;
//   width: 58px;
//   height: 28px;
//   border-style: none;
//   border: solid 1px #999999;
//   color: #999999;
//   background-color: #ffffff;
//   border-radius: 4px;
// }
.sj {
  margin: 20px auto 0;
  width: 80%;
  box-sizing: border-box;
  position: relative;
  border-bottom: 1px solid #e7e2e5;
}
.sj1 {
  width: 33.333%;
  height: 30px;
  margin: 5px 0;
  padding: 0 6px;
  display: inline-block;
  vertical-align: middle;
  box-sizing: border-box;
  border-right: 1px solid #e7e2e5;
  text-align: center;
}
.sj > .sj1:nth-child(3) {
  border-right-color: transparent;
}
.sj2 {
  font-size: 14px;
  color: #4a4945;
  line-height: 20px;
  margin-top: -5px;
  position: relative;
}
.sj3 {
  font-size: 11px;
  color: #999999;
  line-height: 15px;
}
.sl1 {
  margin: 10px auto;
  font-size: 12px;
  color: #999999;
  line-height: 20px;
  text-align: center;
}
.sl2 {
  display: inline-block;
  margin-right: 7px;
}
.sl3 {
  display: inline-block;
  margin-right: 0;
}
.tx1 {
  width: 40px;
  height: 40px;
  font-size: 0;
  margin-right: 10px;
}
.spname1 {
  height: 20px;
  display: inline-block;
  max-width: 66%;
  margin-right: 0;
  font-size: 13px;
  height: 20px;
  line-height: 20px;
  text-align: left;
  color: #4a4945;
  display: block;
}
.sptime1 {
  font-size: 12px;
  height: 20px;
  line-height: 20px;
  color: #999999;
  display: block;
}
.spnr1 {
  margin: 10px 15px 11px 0;
  font-size: 14px;
  color: #4a4945;
  line-height: 20px;
  max-height: 80px;
  display: block;
}
</style>
